{% extends "layout/basic.html" %}
{% block content %}
<script>
  var Context = {{ {
    'problemId': pdoc['doc_id'],
    'socketUrl': '{}-conn'.format(reverse_url('problem_pretest', pid=pdoc['doc_id'])),
    'postPretestUrl': reverse_url('problem_pretest', pid=pdoc['doc_id']),
    'postSubmitUrl': reverse_url('problem_submit', pid=pdoc['doc_id']) if not tdoc else reverse_url('contest_detail_problem_submit', tid=tdoc['doc_id'], pid=pdoc['doc_id']),
    'getSubmissionsUrl': reverse_url('problem_submit', pid=pdoc['doc_id']) if not tdoc else reverse_url('contest_detail_problem_submit', tid=tdoc['doc_id'], pid=pdoc['doc_id']),
    'getRecordDetailUrl': reverse_url('record_detail', rid='{rid}'),
    'code_lang': handler.get_setting('code_lang'),
    'code_template': handler.get_code_template(),
  }|json|safe }};
</script>
<div class="row">
  <div class="medium-9 columns">
    <div class="section">
      <div class="problem-content-container"><div class="problem-content" data-marker-enabled>
        <div class="section__header non-scratchpad--hide">
          <h1>{{ pdoc['title'] }}</h1>
        </div>
        <div class="section__body typo">
        {% if not pdoc['data'] %}
          <blockquote class="warn">
            <p>{{ _('No dataset at present.') }}</p>
          </blockquote>
        {% endif %}
        {% if tdoc and handler.is_done(tdoc) %}
          <blockquote class="note">
            <p>{{ _('You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.') }}</p>
          </blockquote>
        {% endif %}
          {{ pdoc['content']|markdown }}
        </div>
      </div></div>
    </div>
  </div>
  <div class="medium-3 columns">
    {% with owner_udoc=udoc %}
    {% include "partials/problem_sidebar.html" %}
    {% endwith %}
  </div>
</div>
<div class="scratchpad-container" style="display:none">
  <div style="display:none" class="loader-container"><div class="loader"></div></div>
  <div id="scratchpad" style="opacity:0"></div>
</div>
{% endblock %}
